Reference paper: https://www.aanda.org/articles/aa/pdf/2011/05/aa16128-10.pdf
from agilepy.api.AGAnalysis import AGAnalysis
# Interactive plots
#%matplotlib widget
confFilePath = "$HOME/agilepy_conf.yaml"
AGAnalysis.getConfiguration(
confFilePath = confFilePath,
evtfile="/AGILE_PROC3/FM3.119_ASDCe/INDEX/EVT.index",
logfile="/AGILE_PROC3/DATA_ASDCe/INDEX/LOG.log.index",
userName = "username",
sourceName = "PKS1510-089",
tmin = 54891,
tmax = 54921,
timetype = "MJD",
glon = 351.29,
glat = 40.13,
outputDir = "$HOME/agilepy_analysis",
verboselvl = 0
)
ag = AGAnalysis(confFilePath)
ag.setOptions(binsize=0.5)
#print all options of the configuration file
ag.printOptions()
{ 'ap': {'radius': 3, 'timeslot': 3600},
'input': { 'evtfile': '/AGILE_PROC3/FM3.119_ASDCe/INDEX/EVT.index',
'logfile': '/AGILE_PROC3/DATA_ASDCe/INDEX/LOG.log.index'},
'maps': { 'binsize': 0.5,
'energybins': [[100, 10000]],
'expstep': 4.0,
'fovbinnumber': 1,
'mapsize': 40,
'offaxisangle': 30,
'proj': 'ARC',
'projtype': 'WCS',
'spectralindex': 2.1,
'timestep': 160,
'useEDPmatrixforEXP': False},
'mle': { 'contourpoints': 40,
'edpcorrection': 0.75,
'expratio_maxthr': 15,
'expratio_minthr': 0,
'expratio_size': 10,
'expratioevaluation': True,
'fluxcorrection': 0,
'integratortype': 1,
'loccl': 5.99147,
'mindefaulttolerance': 0.01,
'minimizeralg': 'Migrad',
'minimizerdefstrategy': 2,
'minimizertype': 'Minuit',
'ranal': 10,
'ulcl': 2},
'model': { 'emax_sources': 10000,
'emin_sources': 100,
'galcoeff': [-1],
'galmode': 1,
'galmode2': 0,
'galmode2fit': 0,
'isocoeff': [-1],
'isomode': 1,
'isomode2': 0,
'isomode2fit': 0,
'modelfile': None},
'output': { 'filenameprefix': 'analysis_product',
'logfilenameprefix': 'analysis_log',
'outdir': PosixPath('/Users/bulgarelli/agilepy_analysis/PKS1510-089_username_20210326-163540'),
'sourcename': 'username',
'username': 'PKS1510-089',
'verboselvl': 0},
'plotting': {'twocolumns': False},
'selection': { 'albedorad': 80,
'bpointing': None,
'dq': 0,
'emax': 10000,
'emin': 100,
'filtercode': 5,
'fovradmax': 60,
'fovradmin': 0,
'glat': 40.13,
'glon': 351.290001,
'lonpole': 180,
'lpointing': None,
'maplistgen': 'None',
'phasecode': 18,
'proj': 'ARC',
'timelist': 'None',
'timetype': 'TT',
'tmax': 165542400.0,
'tmin': 162950400.0}}
#sources = ag.loadSourcesFromCatalog("2AGL", rangeDist = (0, 5), show=True)
#aggiungeto una sorgente in questo modo non funziona più il selectSources
newSourceDict = {
"glon" : 351.29,
"glat": 40.13,
"spectrumType" : "PowerLaw",
"flux": 2.0e-07,
"index": 2.1
}
newSource = ag.addSource("PKS1510-089", newSourceDict)
sources = ag.selectSources("flux > 0", show = True)
----------------------------------------------------------- Source name: PKS1510-089 (PointSource) * Free parameters: none * Initial source parameters: (PowerLaw) - flux(ph/cm2s): 2e-07 - index: 2.1 - Source position: (351.29, 40.13) (l,b) - Distance from map center: 0.0 deg
Freeable params = [flux, index, index1, index2, cutoffEnergy, pivotEnergy, curvature, pos]
affectedSources = ag.freeSources('name == "PKS1510-089"', "flux", True, show=True)
----------------------------------------------------------- Source name: PKS1510-089 (PointSource) * Free parameters: flux * Initial source parameters: (PowerLaw) - flux(ph/cm2s): 2e-07 - index: 2.1 - Source position: (351.29, 40.13) (l,b) - Distance from map center: 0.0 deg
In this example, only one source is affected.
#Generate maps
maplistfile = ag.generateMaps()
Generating maps..please wait.
#Display counts map
ag.displayCtsSkyMaps(maplistFile=maplistfile, smooth=3, catalogRegions="2AGL", catalogRegionsColor="green")
Generating plot..please wait. 2021-03-26 16:36:44,385 [WARNING ] [AGAnalysis] singleMode has been turned off because only one map is going to be displayed.
[None]
#Fix the diffuse emission coefficient to a default value.
ag.setOptions(galcoeff=[0.7])
ag.printOptions("model")
{ 'emax_sources': 10000,
'emin_sources': 100,
'galcoeff': [0.7],
'galmode': 1,
'galmode2': 0,
'galmode2fit': 0,
'isocoeff': [-1],
'isomode': 1,
'isomode2': 0,
'isomode2fit': 0,
'modelfile': None}
#Perform a maximum likelihood estimator
ag.mle()
['/Users/bulgarelli/agilepy_analysis/PKS1510-089_username_20210326-163540/mle/0/analysis_product_PKS1510-089.source']
#Display the results
ag.selectSources("sqrtTS > 0", show=True)
----------------------------------------------------------- Source name: PKS1510-089 (PointSource) => sqrt(ts): 19.7187 * Free parameters: flux * Initial source parameters: (PowerLaw) - flux(ph/cm2s): 2e-07 - index: 2.1 - Source position: (351.29, 40.13) (l,b) - Distance from map center: 0.0 deg * Last MLE analysis: - flux(ph/cm2s): 1.72607e-06 +/- 1.23403e-07 - index: 2.1 - upper limit(ph/cm2s): 1.97991e-06 - ergLog(erg/cm2s): 2.78962e-10 +/- 1.99439e-11 - galCoeff: [0.7] - isoCoeff: [11.0233] +/- [0.367608] - exposure(cm2s): 356285000.0 - exp-ratio: 0.0 - L_peak: 351.29 - B_peak: 40.13 - Distance from start pos: 0.0 - position: - L: -1.0 - B: -1.0 - Distance from start pos: -1.0 - radius of circle: -1.0 - ellipse: - a: -1.0 - b: -1.0 - phi: -1.0 -----------------------------------------------------------
[<agilepy.core.SourceModel.Source at 0x7f8e409fea50>]
#energybin=2 to calcolate spectral index
ag.setOptionEnergybin(2)
ag.setOptions(galcoeff=[0.7, 0.7, 0.7, 0.7])
ag.setOptions(isocoeff=[-1, -1, -1, -1])
maplistfile = ag.generateMaps()
Generating maps..please wait.
ag.displayCtsSkyMaps(maplistFile=maplistfile, smooth=3, normType="power", catalogRegions="2AGL", catalogRegionsColor="green")
Generating plot..please wait.
[None]
affectedSources = ag.freeSources('name == "PKS1510-089"', "index", True, show=True)
----------------------------------------------------------- Source name: PKS1510-089 (PointSource) => sqrt(ts): 19.7187 * Free parameters: flux index * Initial source parameters: (PowerLaw) - flux(ph/cm2s): 2e-07 - index: 2.1 - Source position: (351.29, 40.13) (l,b) - Distance from map center: 0.0 deg * Last MLE analysis: - flux(ph/cm2s): 1.72607e-06 +/- 1.23403e-07 - index: 2.1 - upper limit(ph/cm2s): 1.97991e-06 - ergLog(erg/cm2s): 2.78962e-10 +/- 1.99439e-11 - galCoeff: [0.7] - isoCoeff: [11.0233] +/- [0.367608] - exposure(cm2s): 356285000.0 - exp-ratio: 0.0 - L_peak: 351.29 - B_peak: 40.13 - Distance from start pos: 0.0 - position: - L: -1.0 - B: -1.0 - Distance from start pos: -1.0 - radius of circle: -1.0 - ellipse: - a: -1.0 - b: -1.0 - phi: -1.0 -----------------------------------------------------------
ag.mle()
['/Users/bulgarelli/agilepy_analysis/PKS1510-089_username_20210326-163540/mle/1/analysis_product_PKS1510-089.source']
selectedSources = ag.selectSources('flux > 0', show=True)
----------------------------------------------------------- Source name: PKS1510-089 (PointSource) => sqrt(ts): 19.9717 * Free parameters: flux index * Initial source parameters: (PowerLaw) - flux(ph/cm2s): 1.72607e-06 +/- 1.23403e-07 - index: 2.1 - Source position: (351.29, 40.13) (l,b) - Distance from map center: 0.0 deg * Last MLE analysis: - flux(ph/cm2s): 1.57196e-06 +/- 1.42169e-07 - index: 2.0798 +/- 0.0714075 - upper limit(ph/cm2s): 1.80678e-06 - ergLog(erg/cm2s): 2.54054e-10 +/- 2.29769e-11 - galCoeff: [0.7, 0.7, 0.7, 0.7] - isoCoeff: [6.02917, 3.10661, 0.883927, 0.101837] +/- [0.30932, 0.158011, 0.0575979, 0.0233871] - exposure(cm2s): 356730000.0 - exp-ratio: 0.0 - L_peak: 351.29 - B_peak: 40.13 - Distance from start pos: 0.0 - position: - L: -1.0 - B: -1.0 - Distance from start pos: -1.0 - radius of circle: -1.0 - ellipse: - a: -1.0 - b: -1.0 - phi: -1.0 -----------------------------------------------------------
ag.setOptionEnergybin(0)
ag.setOptions(galcoeff=[0.7])
affectedSources = ag.freeSources('name == "PKS1510-089"', "index", False, show=True)
----------------------------------------------------------- Source name: PKS1510-089 (PointSource) => sqrt(ts): 19.9717 * Free parameters: flux * Initial source parameters: (PowerLaw) - flux(ph/cm2s): 1.72607e-06 +/- 1.23403e-07 - index: 2.1 - Source position: (351.29, 40.13) (l,b) - Distance from map center: 0.0 deg * Last MLE analysis: - flux(ph/cm2s): 1.57196e-06 +/- 1.42169e-07 - index: 2.0798 +/- 0.0714075 - upper limit(ph/cm2s): 1.80678e-06 - ergLog(erg/cm2s): 2.54054e-10 +/- 2.29769e-11 - galCoeff: [0.7, 0.7, 0.7, 0.7] - isoCoeff: [6.02917, 3.10661, 0.883927, 0.101837] +/- [0.30932, 0.158011, 0.0575979, 0.0233871] - exposure(cm2s): 356730000.0 - exp-ratio: 0.0 - L_peak: 351.29 - B_peak: 40.13 - Distance from start pos: 0.0 - position: - L: -1.0 - B: -1.0 - Distance from start pos: -1.0 - radius of circle: -1.0 - ellipse: - a: -1.0 - b: -1.0 - phi: -1.0 -----------------------------------------------------------
lightCurveData1 = ag.lightCurveMLE("PKS1510-089", binsize=86400)
Computing light curve bins..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
cat $lightCurveData1
time_start_mjd time_end_mjd sqrt(ts) flux flux_err flux_ul gal gal_error iso iso_error l_peak b_peak dist_peak l b r ell_dist a b phi exposure ExpRatio counts counts_err Index Index_Err Par2 Par2_Err Par3 Par3_Err Erglog Erglog_Err Erglog_UL time_start_utc time_end_utc time_start_tt time_end_tt Fix index ULConfidenceLevel SrcLocConfLevel start_l start_b start_flux typefun par2 par3 galmode2 galmode2fit isomode2 isomode2fit edpcor fluxcor integratortype expratioEval expratio_minthr expratio_maxthr expratio_size Emin emax fovmin fovmax albedo binsize expstep phasecode 54891.0 54892.0 0.0 0.0 28.8667e-08 64.4451e-08 0.7 0.0 10.579 0.000713343 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 15327000.0 0.0 0.0 4.42441 2.0798 0.0 0.0 0.0 0.0 0.0 0.0 4.66533e-11 1.04154e-10 2009-03-01T00:00:00 2009-03-02T00:00:00 162950400.0 163036800.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54901.0 54902.0 3.58314 198.405e-08 79.1263e-08 381.761e-08 0.7 0.0 8.80173 0.408743 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 9642940.0 0.0 19.1321 7.63011 2.0798 0.0 0.0 0.0 0.0 0.0 3.20654e-10 1.27881e-10 6.16987e-10 2009-03-11T00:00:00 2009-03-12T00:00:00 163814400.0 163900800.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54902.0 54903.0 8.05878 419.308e-08 82.5331e-08 599.813e-08 0.7 0.0 10.579 0.383106 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 14133400.0 0.0 59.2625 11.6647 2.0798 0.0 0.0 0.0 0.0 0.0 6.7767e-10 1.33387e-10 9.69395e-10 2009-03-12T00:00:00 2009-03-13T00:00:00 163900800.0 163987200.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54903.0 54904.0 7.79777 392.991e-08 81.2102e-08 571.43e-08 0.7 0.0 12.0522 0.359351 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 13751600.0 0.0 54.0424 11.1677 2.0798 0.0 0.0 0.0 0.0 0.0 6.35137e-10 1.31249e-10 9.23522e-10 2009-03-13T00:00:00 2009-03-14T00:00:00 163987200.0 164073600.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54904.0 54905.0 3.53798 142.41e-08 56.5009e-08 273.383e-08 0.7 0.0 9.83944 0.342171 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 13502200.0 0.0 19.2285 7.62885 2.0798 0.0 0.0 0.0 0.0 0.0 2.30157e-10 9.13145e-11 4.41832e-10 2009-03-14T00:00:00 2009-03-15T00:00:00 164073600.0 164160000.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54905.0 54906.0 3.5621 171.978e-08 66.0177e-08 323.076e-08 0.7 0.0 13.0943 0.355622 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 12904700.0 0.0 22.1932 8.51937 2.0798 0.0 0.0 0.0 0.0 0.0 2.77944e-10 1.06695e-10 5.22143e-10 2009-03-15T00:00:00 2009-03-16T00:00:00 164160000.0 164246400.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54906.0 54907.0 2.62458 106.122e-08 55.5223e-08 239.358e-08 0.7 0.0 13.6605 0.313635 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 12575300.0 0.0 13.3451 6.98209 2.0798 0.0 0.0 0.0 0.0 0.0 1.7151e-10 8.97331e-11 3.86842e-10 2009-03-16T00:00:00 2009-03-17T00:00:00 164246400.0 164332800.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54907.0 54908.0 3.52958 141.467e-08 58.9665e-08 280.999e-08 0.7 0.0 9.73859 0.336127 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 12076400.0 0.0 17.0841 7.12104 2.0798 0.0 0.0 0.0 0.0 0.0 2.28633e-10 9.52994e-11 4.5414e-10 2009-03-17T00:00:00 2009-03-18T00:00:00 164332800.0 164419200.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54908.0 54909.0 5.21564 273.131e-08 76.9154e-08 445.382e-08 0.7 0.0 10.8123 0.372572 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 12029000.0 0.0 32.8547 9.25211 2.0798 0.0 0.0 0.0 0.0 0.0 4.41423e-10 1.24308e-10 7.19809e-10 2009-03-18T00:00:00 2009-03-19T00:00:00 164419200.0 164505600.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54909.0 54910.0 6.79047 421.615e-08 96.3149e-08 634.102e-08 0.7 0.0 11.7193 0.422468 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 11751700.0 0.0 49.5469 11.3186 2.0798 0.0 0.0 0.0 0.0 0.0 6.81397e-10 1.5566e-10 1.02481e-09 2009-03-19T00:00:00 2009-03-20T00:00:00 164505600.0 164592000.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54910.0 54911.0 5.45774 278.217e-08 78.3112e-08 454.402e-08 0.7 0.0 7.69464 0.390316 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 10991400.0 0.0 30.58 8.60752 2.0798 0.0 0.0 0.0 0.0 0.0 4.49644e-10 1.26564e-10 7.34387e-10 2009-03-20T00:00:00 2009-03-21T00:00:00 164592000.0 164678400.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54892.0 54893.0 0.118036 3.85085e-08 70.8409e-08 87.5579e-08 0.7 0.0 10.1439 0.323854 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 14312700.0 0.0 0.551158 10.1392 2.0798 0.0 0.0 0.0 0.0 0.0 6.22359e-12 1.1449e-10 1.41508e-10 2009-03-02T00:00:00 2009-03-03T00:00:00 163036800.0 163123200.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54911.0 54912.0 1.73815 99.3381e-08 68.4808e-08 261.811e-08 0.7 0.0 13.5162 0.400171 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 11005500.0 0.0 10.9327 7.53668 2.0798 0.0 0.0 0.0 0.0 0.0 1.60546e-10 1.10676e-10 4.23129e-10 2009-03-21T00:00:00 2009-03-22T00:00:00 164678400.0 164764800.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54912.0 54913.0 3.95173 209.069e-08 77.2557e-08 387.213e-08 0.7 0.0 11.8037 0.370057 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 10417300.0 0.0 21.7793 8.04794 2.0798 0.0 0.0 0.0 0.0 0.0 3.37889e-10 1.24858e-10 6.25798e-10 2009-03-22T00:00:00 2009-03-23T00:00:00 164764800.0 164851200.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54913.0 54914.0 2.72023 154.124e-08 75.0654e-08 330.357e-08 0.7 0.0 11.83 0.383326 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 9797000.0 0.0 15.0995 7.35416 2.0798 0.0 0.0 0.0 0.0 0.0 2.49089e-10 1.21318e-10 5.3391e-10 2009-03-23T00:00:00 2009-03-24T00:00:00 164851200.0 164937600.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54914.0 54915.0 4.25775 292.22e-08 98.9157e-08 517.201e-08 0.7 0.0 12.9046 0.380212 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 8249200.0 0.416419 24.1058 8.15976 2.0798 0.0 0.0 0.0 0.0 0.0 4.72275e-10 1.59864e-10 8.35881e-10 2009-03-24T00:00:00 2009-03-25T00:00:00 164937600.0 165024000.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54915.0 54916.0 7.08949 543.914e-08 120.167e-08 809.355e-08 0.7 0.0 14.2042 0.378383 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 8602120.0 1.36823 46.7882 10.3369 2.0798 0.0 0.0 0.0 0.0 0.0 8.79054e-10 1.9421e-10 1.30805e-09 2009-03-25T00:00:00 2009-03-26T00:00:00 165024000.0 165110400.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54916.0 54917.0 3.29853 250.717e-08 102.938e-08 487.858e-08 0.7 0.0 14.2463 0.393003 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 7576590.0 3.15289 18.9958 7.79921 2.0798 0.0 0.0 0.0 0.0 0.0 4.05199e-10 1.66365e-10 7.88458e-10 2009-03-26T00:00:00 2009-03-27T00:00:00 165110400.0 165196800.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54917.0 54918.0 5.56342 354.761e-08 104.919e-08 595.079e-08 0.7 0.0 11.7166 0.358809 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 7598640.0 5.71089 26.957 7.97239 2.0798 0.0 0.0 0.0 0.0 0.0 5.73351e-10 1.69565e-10 9.61745e-10 2009-03-27T00:00:00 2009-03-28T00:00:00 165196800.0 165283200.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54918.0 54919.0 2.48239 179.404e-08 95.3464e-08 404.574e-08 0.7 0.0 12.6517 0.396098 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 7073150.0 9.04224 12.6895 6.74399 2.0798 0.0 0.0 0.0 0.0 0.0 2.89945e-10 1.54095e-10 6.53857e-10 2009-03-28T00:00:00 2009-03-29T00:00:00 165283200.0 165369600.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54919.0 54920.0 2.84699 207.756e-08 104.242e-08 457.364e-08 0.7 0.0 13.4991 0.39762 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 6560830.0 13.4444 13.6305 6.83914 2.0798 0.0 0.0 0.0 0.0 0.0 3.35768e-10 1.68472e-10 7.39173e-10 2009-03-29T00:00:00 2009-03-30T00:00:00 165369600.0 165456000.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54920.0 54921.0 3.30016 297.305e-08 119.837e-08 570.59e-08 0.7 0.0 10.9634 0.420791 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 5944460.0 18.4414 17.6732 7.12366 2.0798 0.0 0.0 0.0 0.0 0.0 4.80493e-10 1.93676e-10 9.22166e-10 2009-03-30T00:00:00 2009-03-31T00:00:00 165456000.0 165542400.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54893.0 54894.0 0.0 2331470.0e-08 12.1526e-08 41.8201e-08 0.7 0.0 9.49691 0.000339208 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 15551300.0 0.0 3.62574e-07 1.88989 2.0798 0.0 0.0 0.0 0.0 0.0 3.76803e-18 1.96405e-11 6.7588e-11 2009-03-03T00:00:00 2009-03-04T00:00:00 163123200.0 163209600.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54894.0 54895.0 0.0 72164500.0e-08 11.6686e-08 41.2762e-08 0.7 0.0 10.3525 0.000276228 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 15420500.0 0.0 1.11281e-07 1.79935 2.0798 0.0 0.0 0.0 0.0 0.0 1.16629e-18 1.88584e-11 6.6709e-11 2009-03-04T00:00:00 2009-03-05T00:00:00 163209600.0 163296000.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54895.0 54896.0 0.0 0.0 9.53217e-08 36.2917e-08 0.7 0.0 11.4341 0.000169587 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 15443200.0 0.0 0.0 1.47208 2.0798 0.0 0.0 0.0 0.0 0.0 0.0 1.54055e-11 5.86532e-11 2009-03-05T00:00:00 2009-03-06T00:00:00 163296000.0 163382400.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54896.0 54897.0 3.33663 121.41e-08 50.4699e-08 238.556e-08 0.7 0.0 9.33734 0.345743 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 15304200.0 0.0 18.5809 7.72403 2.0798 0.0 0.0 0.0 0.0 0.0 1.96218e-10 8.15674e-11 3.85544e-10 2009-03-06T00:00:00 2009-03-07T00:00:00 163382400.0 163468800.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54897.0 54898.0 2.55795 103.483e-08 51.6936e-08 223.376e-08 0.7 0.0 9.29558 0.37542 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 14884700.0 0.0 15.4032 7.69445 2.0798 0.0 0.0 0.0 0.0 0.0 1.67245e-10 8.35453e-11 3.61012e-10 2009-03-07T00:00:00 2009-03-08T00:00:00 163468800.0 163555200.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54898.0 54899.0 3.2565 134.218e-08 56.1461e-08 263.707e-08 0.7 0.0 8.99466 0.390317 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 14806500.0 0.0 19.8729 8.31327 2.0798 0.0 0.0 0.0 0.0 0.0 2.16917e-10 9.07412e-11 4.26193e-10 2009-03-08T00:00:00 2009-03-09T00:00:00 163555200.0 163641600.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54899.0 54900.0 4.0859 197.914e-08 67.8373e-08 350.524e-08 0.7 0.0 10.5058 0.421435 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 14619600.0 0.0 28.9343 9.91756 2.0798 0.0 0.0 0.0 0.0 0.0 3.19861e-10 1.09636e-10 5.66503e-10 2009-03-09T00:00:00 2009-03-10T00:00:00 163641600.0 163728000.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0 54900.0 54901.0 4.00852 169.655e-08 60.196e-08 307.119e-08 0.7 0.0 10.2897 0.369442 351.29 40.13 0.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 14455400.0 0.0 24.5243 8.70159 2.0798 0.0 0.0 0.0 0.0 0.0 2.7419e-10 9.72865e-11 4.96354e-10 2009-03-10T00:00:00 2009-03-11T00:00:00 163728000.0 163814400.0 1.0 2.0798 2.0 5.99147 351.29 40.13 1.57196e-06 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.75 0.0 1.0 1.0 0.0 15.0 10.0 100.0 10000.0 0.0 60.0 80.0 0.5 0.0 18.0
print(lightCurveData1)
/Users/bulgarelli/agilepy_analysis/PKS1510-089_username_20210326-163540/lc/0/light_curve_162950400_165542400.txt
ag.displayLightCurve("mle")
Generating plot..please wait.
affectedSources = ag.freeSources('name == "PKS1510-089"', "pos", True, show=True)
lightCurveData1 = ag.lightCurveMLE("PKS1510-089", binsize=86400)
----------------------------------------------------------- Source name: PKS1510-089 (PointSource) => sqrt(ts): 19.9717 * Free parameters: flux pos * Initial source parameters: (PowerLaw) - flux(ph/cm2s): 1.72607e-06 +/- 1.23403e-07 - index: 2.1 - Source position: (351.29, 40.13) (l,b) - Distance from map center: 0.0 deg * Last MLE analysis: - flux(ph/cm2s): 1.57196e-06 +/- 1.42169e-07 - index: 2.0798 +/- 0.0714075 - upper limit(ph/cm2s): 1.80678e-06 - ergLog(erg/cm2s): 2.54054e-10 +/- 2.29769e-11 - galCoeff: [0.7, 0.7, 0.7, 0.7] - isoCoeff: [6.02917, 3.10661, 0.883927, 0.101837] +/- [0.30932, 0.158011, 0.0575979, 0.0233871] - exposure(cm2s): 356730000.0 - exp-ratio: 0.0 - L_peak: 351.29 - B_peak: 40.13 - Distance from start pos: 0.0 - position: - L: -1.0 - B: -1.0 - Distance from start pos: -1.0 - radius of circle: -1.0 - ellipse: - a: -1.0 - b: -1.0 - phi: -1.0 ----------------------------------------------------------- Computing light curve bins..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
ag.displayLightCurve("mle")
Generating plot..please wait.
lightCurveData4 = ag.lightCurveMLE("PKS1510-089", binsize=86400*4)
Computing light curve bins..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
Generating maps..please wait.
ag.displayLightCurve("mle")
Generating plot..please wait.
ag.selectSources('name == "PKS1510-089"', show=True)
----------------------------------------------------------- Source name: PKS1510-089 (PointSource) => sqrt(ts): 19.9717 * Free parameters: flux pos * Initial source parameters: (PowerLaw) - flux(ph/cm2s): 1.72607e-06 +/- 1.23403e-07 - index: 2.1 - Source position: (351.29, 40.13) (l,b) - Distance from map center: 0.0 deg * Last MLE analysis: - flux(ph/cm2s): 1.57196e-06 +/- 1.42169e-07 - index: 2.0798 +/- 0.0714075 - upper limit(ph/cm2s): 1.80678e-06 - ergLog(erg/cm2s): 2.54054e-10 +/- 2.29769e-11 - galCoeff: [0.7, 0.7, 0.7, 0.7] - isoCoeff: [6.02917, 3.10661, 0.883927, 0.101837] +/- [0.30932, 0.158011, 0.0575979, 0.0233871] - exposure(cm2s): 356730000.0 - exp-ratio: 0.0 - L_peak: 351.29 - B_peak: 40.13 - Distance from start pos: 0.0 - position: - L: -1.0 - B: -1.0 - Distance from start pos: -1.0 - radius of circle: -1.0 - ellipse: - a: -1.0 - b: -1.0 - phi: -1.0 -----------------------------------------------------------
[<agilepy.core.SourceModel.Source at 0x7f8e409fea50>]
time_start_mjd time_end_mjd sqrt(ts) flux flux_err flux_ul gal gal_error iso iso_error l_peak b_peak dist_peak l b r ell_dist a b phi exposure ExpRatio counts counts_err Index Index_Err Par2 Par2_Err Par3 Par3_Err Erglog Erglog_Err Erglog_UL time_start_utc time_end_utc time_start_tt time_end_tt Fix index ULConfidenceLevel SrcLocConfLevel start_l start_b start_flux typefun par2 par3 galmode2 galmode2fit isomode2 isomode2fit edpcor fluxcor integratortype expratioEval expratio_minthr expratio_maxthr expratio_size Emin emax fovmin fovmax albedo binsize expstep phasecode
ag.displayGenericColumn(lightCurveData4, "ExpRatio")
#ag.deleteAnalysisDir()